import {Button, Card, Form} from "antd";
import UploadFile from "@/components/common/form/uploadFile";
import {CustomFormItem, InputFormItem, SelectFormItem} from "@/components/common";

const itemStyle = {width: 600};
function GoodsAdd() {
    const [form] = Form.useForm();
    return (
        <Card title="添加商品">
            <Form form={form} labelAlign="left" labelCol={{span: 5}}>
                <InputFormItem name="name" itemStyle={itemStyle} label="商品名称" required />
                <SelectFormItem width={500} name="cagetory" label="商品分类" required />
                <InputFormItem name="1688url" itemStyle={itemStyle} label="1688url" required />
                <InputFormItem name="1688wholesale" itemStyle={itemStyle} label="1688批发价格" required />
                <InputFormItem name="wholesaleMinNun" itemStyle={itemStyle} label="最低批发数量" required />
                <InputFormItem name="oneNumPrice" itemStyle={itemStyle} label="1件代发价格" required />
                <InputFormItem name="price" itemStyle={itemStyle} label="售卖价格" required />
                <InputFormItem name="price" itemStyle={itemStyle} label="积分兑换" required />
                <InputFormItem name="price" itemStyle={itemStyle} label="是否上下架" required />
                <CustomFormItem label="图片">
                    <UploadFile />
                </CustomFormItem>
                <CustomFormItem style={{flex: 1, width: "50%"}}>
                    <Button type="primary" style={{flex: 1, width: "100%"}}>
                        提交
                    </Button>
                </CustomFormItem>
            </Form>
        </Card>
    );
}

export default GoodsAdd;
